/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

dojo.provide("afitco.eTajer.ui.Container");
dojo.require("dijit.dijit"); // optimize: load dijit layer
dojo.require("dijit.layout.BorderContainer");
dojo.require("afitco.eTajer.ui.CategoriesPane");

dojo.require("dijit.layout.ContentPane");

dojo.declare("afitco.eTajer.ui.Container", null,
{
    constructor: function(args)
    {
        console.log("In Container Constructor")
        this._initilizeWidgets();
        
    },

    _initilizeWidgets: function()
    {
        console.log("In Container _initilizeWidgets")
        layout = new dijit.layout.BorderContainer(
        {
            id: "main",
            design: "headline"
        }, document.createElement("div"));
        
        layoutCategory = new dijit.layout.ContentPane(
        {
            splitter: true,
            region: "left",
            style: "height: 100%; width: 200px"
        });
        
        //layoutCategory.domNode.innerHTML = "Left Pane";
        a = new afitco.eTajer.ui.CategoriesPane({}, layoutCategory)
        //layoutCategory.addChild(a.domNode);
        //a.startup();

        layoutTop = new dijit.layout.ContentPane(
        {
            region: "top",
            style: "height: 150px"
        });
        layoutTop.domNode.innerHTML = "Top Pane";
        layoutCenter = new dijit.layout.ContentPane(
        {
            region: "center"
        });
        layoutCenter.domNode.innerHTML = "Main Pane";


        layout.addChild(layoutCategory);
        layout.addChild(layoutTop);
        layout.addChild(layoutCenter);

        dojo.body().appendChild(layout.domNode);
        layout.startup();

    }
    
});
